package com.vsd.repository;

import java.util.Collection;
import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.rest.core.annotation.RestResource;

import com.shopcart.domain.Store;


/**
 * 用户User CrudRepository定义
 * 
 * @author jiekechoo
 *
 */
@RestResource(exported = false)
public interface StoreRepository extends CrudRepository<Store, String> {

	Collection<Store> findAll();

	Store findByAccountAndPassword(String account,String password);
	
	Page<Store> findByPhone(String phone,Pageable p);
	
	Page<Store> findByIdIn(List<String> ids,Pageable p);
	
	Page<Store> findAll(Pageable p);
	
	Page<Store> findByNameLike(String name,Pageable p);
	
	Page<Store> findByAreaCodeLike(String areaCode,Pageable p);
	
	Page<Store> findByAreaCodeLikeAndNameLike(String areaCode,String name,Pageable p);

}
